﻿#include "columnmapping.h"
#include "ui_columnmapping.h"
#include <QDebug>

ColumnMapping::ColumnMapping(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::ColumnMapping)
{
    ui->setupUi(this);
    connect(ui->spinBox_res, &QSpinBox::textChanged, this, &ColumnMapping::updateSlots);
    connect(ui->spinBox_src, &QSpinBox::textChanged, this, &ColumnMapping::updateSlots);
}

ColumnMapping::~ColumnMapping()
{
    delete ui;
}

void ColumnMapping::getColumnMap(COLUMN_MAP *pMap)
{
    pMap->core_flag = ui->checkBox->isChecked();
    pMap->res_col = ui->spinBox_res->value();
    pMap->src_col = ui->spinBox_src->value();
}

void ColumnMapping::setSeq(QString seq)
{
    ui->label_seq->setText(seq);
}

void ColumnMapping::updateSlots(QString text)
{
    Q_UNUSED(text)

    emit updateColumnSignal();
}
